package sg.edu.nus.comp.qa.question;

public class ComparableQuestion extends Question implements
		Comparable<ComparableQuestion> {
	private double value;

	public ComparableQuestion(String q, String a) {
		super(q, a);
	}

	public ComparableQuestion(String q, String a, int value) {
		super(q, a);
		this.value = value;
	}

	@Override
	public int compareTo(ComparableQuestion o) {
		if (this.value == o.value)
			return 0;
		else if (this.value < o.value)
			return -1;
		else
			return 1;
	}

	public double getValue() {
		return value;
	}

	public void setValue(double value) {
		this.value = value;
	}

}
